﻿@{
    Html.LOBHtmlHelper().SetLayout(this);  
}
@{Html.RenderPartial("LinkPath");}

<div class="mtitle">
    @ViewBag.Title
</div>

@Html.LOBHtmlHelper().Busy("busyMain")

<table  cellpadding="1" cellspacing="1" style="table-layout:fixed;" width="100%">
    <tr>
        <td style="width: 100%;height:100%" valign="top">
            @Html.LOBHtmlHelper().GridView()
        </td>
    </tr>
</table>

<script type="text/javascript">

    var _codeBaseGrid = new CodeBaseGrid();
    $(document).ready(function () {
        _codeBaseGrid.Init(
            "grvtblUserAccount",
            "UserGroupID",
            "@Url.Action("View","GroupAccount")",
            "@Url.Action("Edit","GroupAccount")",
            "@Url.Action("Add","GroupAccount")",
            "@Url.Action("Delete","GroupAccount")",
            "@Url.Action("Save","GroupAccount")",
            "AD",
            "AD_tblUserAccount",
            "rptUserAccount"
            );
        _codeBaseGrid.SetWidthPupop(500);
        _codeBaseGrid.SetHeightPupop(300);
    });


    $(window).load(function () {

        var gridview = $("#grvtblUserAccount").data("kendoGrid");
        gridview.hideColumn("FAdm")
    });

    function View(addOnGrid) {
        _codeBaseGrid.View(addOnGrid);
    }

    function Add(addOnGrid) {
        _codeBaseGrid.Add(addOnGrid);
    }

    function Edit(addOnGrid) {
        _codeBaseGrid.Edit(addOnGrid);
    }

    function Delete(addOnGrid) {
        _codeBaseGrid.Delete(addOnGrid);
    }

    function Save() {
        _codeBaseGrid.Save();
    }

    function Undo() {
        _codeBaseGrid.Undo();
    }

    function Print() {
        
    }

    function CustomEnableToolBar(status) {
        document.getElementById('btnPrint').disabled = true;

        document.getElementById('btnPrint').className = "disabled";
    }
</script>
